package test;

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetAddress;
import java.net.Socket;

import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;

import communication.FileAcceptorConnection;
import communication.FileSenderConnection;

public class SecureClientConnection extends SecureSocketConnection {

	public SecureClientConnection(InetAddress address, int port) throws IOException{
		super((SSLSocket)((SSLSocketFactory)SSLSocketFactory.getDefault()).createSocket(address, port));
	      
	}
	
	
	public FileAcceptorConnection createFileAcceptor(int port) throws IOException
	{
		return new FileAcceptorConnection(port);
	}
	
	public FileSenderConnection createFileSender(InetAddress address, int port) throws IOException
	{
		return new FileSenderConnection(address,port);
	}

	
}